﻿using System.Windows;
using weBoard;

namespace weBoardSvr
{
    /// <summary>
    /// Interaction logic for drawingWnd.xaml
    /// </summary>
    public partial class drawingWnd
    {
        /// <summary>
        /// To get ability to close app
        /// </summary>
        public bool CanClose;

        /// <summary>
        /// Robot
        /// </summary>
        public drawingMachine Bot;

        /// <summary>
        /// Window for collaborative drawing picture show
        /// </summary>
        public drawingWnd()
        {
            InitializeComponent();
            Bot = new drawingMachine(Draw);
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Hide();
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (CanClose)
                e.Cancel = false;
            else
            {
                e.Cancel = true;
                Hide();    
            }
        }
    }
}
